size = int(input("请输入三角形长度："))

print("左下：")
i = 1
while i <= size:
    print("*" * i)
    i += 1


print("右下：")
i = 1
while i <= size:
    print(" " * (size - i) + "*" * i)
    i += 1

print("左上：")
i = size
while i >= 1:
    print("*" * i)
    i -= 1


print("右上：")
i = size
while i >= 1:
    print(" " * (size - i) + "*" * i)
    i -= 1